/*
 * Voronoicavities.h
 *
 *  Created on: May 26, 2012
 *      Author: marchi
 */

#ifndef VORONOI_CAVITIES_H_
#define VORONOI_CAVITIES_H_
#include "Voronoi.h"
#include "Histogram.h"
#include <map>
#include <iterator>
#include "CavityData.h"

#include "Vertex.h"
using namespace Topol_NS;
using namespace Histogram_NS;


namespace Cavities {
class Voronoi_cavities: public Voronoi {
protected:
	vector<Histogram> hstg;
	map<Vertex,CavityData > cv;
	map<Vertex,set<Vertex> > cvnei;
	set<SetCavityData> cvnd;
	Topol Top;
	vector<double> tot_hg;
	virtual void WriteIt(std::ofstream &);
public:
	Voronoi_cavities():Voronoi(), hstg(vector<Histogram>(1000)){};
	Voronoi_cavities(int, const vector<string> &,bool);
	virtual void sTname(Topol & y ){
		Top=y;
		hstg.resize(Top.gbGMax()+1);}
	virtual void getDelaunay(isTypes &);
	virtual void Channels(){};
	virtual vector<double> & gTotHG(){return tot_hg;}
	virtual void sTotHG(vector<double> & y){tot_hg.clear();tot_hg=y;}
	virtual void copyhgtotot();
	virtual void copytottohg();
	virtual ~Voronoi_cavities();
};

} /* namespace Cavities */
#endif /* VORONOICAVITIES_H_ */
